import java.sql.Driver;
import java.util.Properties;
import java.util.ResourceBundle;

public class JdbcDemo02 {
    public static void main(String[] args) {
        // 1、注册驱动
        try {
            Class.forName("com.mysql.jdbc.Driver");// 反射
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        // 2、获取连接
        ResourceBundle rb = ResourceBundle.getBundle("jdbc");
        String url = rb.getString("url");
        String user = rb.getString("user");
        String password = rb.getString("password");
        System.out.println(url);
    }
}
